#ifndef MYOBJECTASHANDLE_H
#define MYOBJECTASHANDLE_H

///////////////////////////////////////////////////////////////////////////////
//
// MyObjectAsHandle.h
//
///////////////////////////////////////////////////////////////////////////////
//
// Author:            Jan Maes
// Created:           Sunday, June 15, 2008
// Responsibilities:  Objects of class MyObjectAsHandle can only be
//                    created using the HandleFactory::HandleFactory::Create
//                    member functions. As a result we get a
//                    HandleFactory::Handle object as output.
//
///////////////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
// Includes
///////////////////////////////////////////////////////////////////////////////

#include <HandleFactory/HandleFactory.h>

#include <boost/smart_ptr.hpp>

///////////////////////////////////////////////////////////////////////////////
// MyObjectAsHandle
///////////////////////////////////////////////////////////////////////////////

class MyObjectAsHandle : public HandleFactory::HandleFactory<MyObjectAsHandle>
  {
  private:
    friend class HandleFactory::HandleFactory<MyObjectAsHandle>;

    MyObjectAsHandle() : m_double(0.0) 
      {
      }

    explicit MyObjectAsHandle(double i_double)
      {
      m_double = i_double;
      }

    ~MyObjectAsHandle()
      {
      }

  public:
  
    double GetDouble() const 
      {
      return m_double;
      }

  private:

    double m_double;

  };

#endif